package polimi.sc.expoquest.screen.singleplay;

import java.util.Random;
import polimi.sc.expoquest.R;
import polimi.sc.expoquest.screen.DashboardActivity;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
public class SingleplayMainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_singleplay_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_singleplay_main, menu);
		return true;
	}
	
	//Listeners of buttons
	public void rollBtnPressed(View v)
	{
		Random generator = new Random();
		
		int random = generator.nextInt(3); // find a random number between 0,1,2
		//TODO delete
		random = 2;
		if (random == 0)
		{
			Intent dashbordIntent = new Intent(this, SingleplayTriviaActivity.class);
	        startActivity(dashbordIntent);
		}
		else if (random == 1)
		{
			Intent dashbordIntent = new Intent(this, SingleplayCommentActivity.class);
	        startActivity(dashbordIntent);
		}
		else if (random == 2)  
		{
			Intent dashbordIntent = new Intent(this, SingleplayCameraActivity.class);
	        startActivity(dashbordIntent);
		}

	}
	public void homepagebtn_click(View v){
		Intent dashbordIntent = new Intent(this, DashboardActivity.class);
        startActivity(dashbordIntent);
	}

}
